// pages/me/login/login.js



Page({
  data: {
    moreHeight: 0,
  },

  onLoad: function (options) {
    wx.getSystemInfo({
      success: (res) => {
        let windowHeight = (res.windowHeight * (750 / res.windowWidth)); //将高度由 px转化为rpx
        this.setData({
          moreHeight: windowHeight - 300+80
        });
      },
    });
  },

  hadTap: function () {
    getApp().$routes.goTo(getApp().$routes.loginPhonePage, {});
    // wx.navigateTo({
    //   url: '/pages/login/phone_login',
    // })
  },

  tapAgreementClick: function (e) {
    getApp().$routes.goTo(getApp().$routes.aggrementPage);
    // wx.navigateTo({
    //   url: '/pages/other/agreement/index',
    // })
  },

  bindGetUserInfo: function (e) {

    wx.login({
      success: function (res) {

        wx.getUserInfo({
          success: function (res) {
            let codeData = {
              iv: res.iv,
              encrypt_data: res.encryptedData
            }

            getApp().$http.wxLogin(res.code, codeData).then(res => {
              console.log(res);
            });

          },
        })









      }
    })


  }



})